﻿/* 7. Write a program that gets a number n and after that gets more n numbers and calculates and prints their sum. */

using System;

public class SumOfN
{
    public static void Main()
    {
        Console.Write("n = ");
        int n = int.Parse(Console.ReadLine());
        double sum = 0;

        for (int number = 1; number <= n; number++)
        {
            Console.Write("n{0} = ", number);
            sum += double.Parse(Console.ReadLine());
        }

        Console.WriteLine("The sum of last n numbers is: {0}", sum);
    }
}